-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove peer routing search-for-self #1051
Conversation
The peer routing module starts a recurring process that searches for peers close to our peer id. This makes the DHT module query the network for peers. Thing is the DHT module is already doing this because periodically searching for peers close to us is in the DHT spec so this ends up making redundant queries. This PR removes the recurring task configured by the peer routing module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a libp2p configuration with the delegates only?
Why would a client need to tell a delegate node to to query for themselves? They'd be doing that in the background to keep their routing tables up to date anyway, right? |
We use this to find and add peers to our PeerStore (and potentially connect with them), as part of the bootstrap process. These can include relevant peers like relays to use as auto relay nodes, as well as peers to fill in the pubsub mesh. A follow up of this measure, would be to at some point drop connections with bootstrap peers when the peer balances its connections and figures out what are the most valuable peers to connect #744 |
More information on the reasoning in #704 |
So I guess we either a - exclude the DHT from the peer routing search-for-self timer a) breaks the |
You could even merge |
Option a: #1055 |
The peer routing module starts a recurring process that searches for
peers close to our peer id.
This makes the DHT module query the network for peers. Thing is the
DHT module is already doing this because periodically searching for
peers close to us is in the DHT spec so this ends up making redundant
queries.
This PR removes the recurring task configured by the peer routing module.